home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / interapplication comm / folder watching / fw receiver / barebones.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  2.1 KB  |  153 lines

  1. /*
  2.     File:        BareBones.h
  3.  
  4.     Contains:    Common header file included by all source files
  5.  
  6.     Written by: Chris White    
  7.  
  8.     Copyright:    Copyright © 1995-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 7/21/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 
  21.  
  22. */
  23.  
  24.  
  25.  
  26. #ifndef __BAREBONES__
  27. #define __BAREBONES__
  28.  
  29.  
  30.  
  31. #ifndef __LISTS__
  32.     #include <Lists.h>
  33. #endif
  34.  
  35.  
  36.  
  37. #define DEBUGGING    1        // Anything that shouldn't normally occur
  38. #define WARNINGS    0        // Something that can occur, but you might like to know about
  39.  
  40.  
  41. #define USE_LDEF            // Using the LDEF or including the source code
  42.  
  43.  
  44. enum
  45. {
  46.     // Generall application stuff
  47.     
  48.     kCreatorCode = 'tdem',                    // Tabs Demo
  49.     kSleepTime = 60L
  50.  
  51. };
  52.  
  53.  
  54.  
  55. enum
  56. {
  57.     // Menu ID numbers
  58.     
  59.     kMenuBarID = 1000,
  60.     kAppleMenu = 1000,
  61.     kFileMenu = 1001
  62. };
  63.  
  64.  
  65.  
  66. enum
  67. {
  68.     // Apple menu commands
  69.     
  70.     cAbout = 1
  71. };
  72.  
  73.  
  74.  
  75. enum
  76. {
  77.     // File menu commands
  78.     
  79.     cQuit = 1
  80. };
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87. enum
  88. {
  89.     // Error strings
  90.     
  91.     kNeedSystem7 = 1,
  92.     kGenericErrorStr
  93. };
  94.  
  95.  
  96.  
  97. enum
  98. {
  99.     // Windows
  100.  
  101.     kDisplayWindow = 1000,
  102.     kAboutDialog,
  103.      kErrorDialog
  104. };
  105.  
  106.  
  107.  
  108. enum
  109. {
  110.     // Strings
  111.  
  112.     kErrorStrings = 1000
  113. };
  114.  
  115.  
  116.  
  117.  
  118. #define kTabsLDEF        1000
  119.  
  120. typedef OSErr (*tContentsProcPtr) ( ListRef theList, void* refCon );
  121.  
  122.  
  123.  
  124.  
  125. // Global Variable Definitions. This allows me to include this file
  126. // in all sources with the extern keyword used in all instances except
  127. // the main source file.
  128.  
  129. #ifdef __MAIN__
  130.     #define    global
  131. #else
  132.     #define    global    extern
  133. #endif
  134.  
  135.  
  136. global    Boolean                    gQuit;                  /* quit program flag */
  137. global    SInt32                    gSleepTime;
  138.  
  139.  
  140.  
  141. #ifndef USE_LDEF
  142.     #define kLDEFID 0
  143. #else
  144.     #define kLDEFID    kTabsLDEF
  145. #endif
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152. #endif    // __BAREBONES__
  153.